home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / vibrant / picture.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  8.5 KB  |  263 lines  |  [TEXT/R*ch]

  1. /*   picture.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *            National Center for Biotechnology Information (NCBI)
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government do not place any restriction on its use or reproduction.
  13. *  We would, however, appreciate having the NCBI and the author cited in
  14. *  any work or product based on this material
  15. *
  16. *  Although all reasonable efforts have been taken to ensure the accuracy
  17. *  and reliability of the software and data, the NLM and the U.S.
  18. *  Government do not and cannot warrant the performance or results that
  19. *  may be obtained by using this software or data. The NLM and the U.S.
  20. *  Government disclaim all warranties, express or implied, including
  21. *  warranties of performance, merchantability or fitness for any particular
  22. *  purpose.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  picture.h
  27. *
  28. * Author:  Jonathan Kans, Jill Shermer
  29. *
  30. * Version Creation Date:   10/23/92
  31. *
  32. * $Revision: 1.11 $
  33. *
  34. * File Description: 
  35. *
  36. * Modifications:  
  37. * --------------------------------------------------------------------------
  38. * Date     Name        Description of modification
  39. * -------  ----------  -----------------------------------------------------
  40. *
  41. *
  42. * ==========================================================================
  43. */
  44.  
  45. #ifndef _PICTURE_
  46. #define _PICTURE_
  47.  
  48. #ifndef _VIBRANT_
  49. #include <vibrant.h>
  50. #endif
  51.  
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55.  
  56. /*****************************************************************************
  57. *
  58. *   STRUCTURE TYPEDEFS
  59. *
  60. *****************************************************************************/
  61.  
  62. typedef struct Nlm_segment {
  63.   Nlm_VoidPtr  dummy;
  64. } PNTR Nlm_SegmenT;
  65.  
  66. typedef struct Nlm_primitive {
  67.   Nlm_VoidPtr  dummy;
  68. } PNTR Nlm_PrimitivE;
  69.  
  70. /*  Custom callback type */
  71.  
  72. typedef void (*Nlm_CustomProc) PROTO((Nlm_Int2, Nlm_Int2, Nlm_Int2, Nlm_Int2));
  73.  
  74. /*  BoxInfo stores the world coordinates of a rectangle */
  75.  
  76. typedef struct Nlm_boxinfo {
  77.   Nlm_Int4  left;
  78.   Nlm_Int4  top;
  79.   Nlm_Int4  right;
  80.   Nlm_Int4  bottom;
  81. } Nlm_BoxInfo, PNTR Nlm_BoxPtr;
  82.  
  83. /*  PntInfo stores the world coordinates of a point */
  84.  
  85. typedef struct Nlm_pntinfo {
  86.   Nlm_Int4  x;
  87.   Nlm_Int4  y;
  88. } Nlm_PntInfo, PNTR Nlm_PntPtr;
  89.  
  90. /*****************************************************************************
  91. *
  92. *   SYMBOL DEFINES
  93. *
  94. *****************************************************************************/
  95.  
  96. /*  Attribute flag bits */
  97.  
  98. #define NO_ATTS             0
  99. #define COLOR_ATT           1
  100. #define STYLE_ATT           2
  101. #define SHADING_ATT         4
  102. #define WIDTH_ATT           8
  103. #define MODE_ATT           16
  104.  
  105. /*  Color specifications */
  106.  
  107. extern Uint1 BLACK_COLOR [3];
  108. extern Uint1 WHITE_COLOR [3];
  109. extern Uint1 RED_COLOR [3];
  110. extern Uint1 GREEN_COLOR [3];
  111. extern Uint1 BLUE_COLOR [3];
  112. extern Uint1 YELLOW_COLOR [3];
  113. extern Uint1 CYAN_COLOR [3];
  114. extern Uint1 MAGENTA_COLOR [3];
  115.  
  116. /*  Line styles */
  117.  
  118. #define NO_LINE_STYLE          0
  119. #define SOLID_LINE             1
  120. #define DOTTED_LINE            2
  121. #define DASHED_LINE            3
  122.  
  123. /*  Shading styles */
  124.  
  125. #define NO_SHADING             0
  126. #define SOLID_SHADING          1
  127. #define DARK_SHADING           2
  128. #define MEDIUM_SHADING         3
  129. #define LIGHT_SHADING          4
  130. #define EMPTY_SHADING          5
  131.  
  132. /*  Pen width */
  133.  
  134. #define NO_PEN_WIDTH           0
  135. #define STD_PEN_WIDTH          1
  136.  
  137. /*  Mode specifications */
  138.  
  139. #define NO_MODE                0
  140. #define COPY_MODE              1
  141. #define MERGE_MODE             2
  142. #define INVERT_MODE            3
  143. #define ERASE_MODE             4
  144.  
  145. /*  Rectangle arrow direction */
  146.  
  147. #define NO_ARROW               0
  148. #define LEFT_ARROW             1
  149. #define RIGHT_ARROW            2
  150. #define UP_ARROW               3
  151. #define DOWN_ARROW             4
  152.  
  153. /*  Symbol types */
  154.  
  155. #define RECT_SYMBOL            1
  156. #define DIAMOND_SYMBOL         2
  157. #define OVAL_SYMBOL            3
  158. #define LEFT_TRIANGLE_SYMBOL   4
  159. #define RIGHT_TRIANGLE_SYMBOL  5
  160. #define UP_TRIANGLE_SYMBOL     6
  161. #define DOWN_TRIANGLE_SYMBOL   7
  162.  
  163. /*  Alignment specifications, relative to point */
  164.  
  165. #define MIDDLE_CENTER          1
  166. #define UPPER_LEFT             2
  167. #define LOWER_LEFT             3
  168. #define UPPER_RIGHT            4
  169. #define LOWER_RIGHT            5
  170. #define UPPER_CENTER           6
  171. #define LOWER_CENTER           7
  172. #define MIDDLE_LEFT            8
  173. #define MIDDLE_RIGHT           9
  174.  
  175. /*  Orientation specifications, relative to point */
  176.  
  177. #define HORIZ_LEFT            11
  178. #define HORIZ_CENTER          12
  179. #define HORIZ_RIGHT           13
  180. #define VERT_ABOVE            14
  181. #define VERT_MIDDLE           15
  182. #define VERT_BELOW            16
  183.  
  184. /*  Text sizes */
  185.  
  186. #define SMALL_TEXT             1
  187. #define MEDIUM_TEXT            2
  188. #define LARGE_TEXT             3
  189.  
  190. /*  Segment highlight style */
  191.  
  192. #define PLAIN_SEGMENT          0
  193. #define FRAME_SEGMENT          1
  194. #define FILL_SEGMENT           2
  195. #define FRAME_CONTENTS         3
  196. #define FILL_CONTENTS          4
  197.  
  198. /*  Primitive highlight style */
  199.  
  200. #define PLAIN_PRIMITIVE        0
  201. #define FRAME_PRIMITIVE        1
  202. #define FILL_PRIMITIVE         2
  203.  
  204. /*****************************************************************************
  205. *
  206. *   FUNCTION PROTOTYPES
  207. *
  208. *****************************************************************************/
  209.  
  210. extern Nlm_SegmenT   Nlm_CreatePicture  PROTO((void));
  211. extern Nlm_SegmenT   Nlm_DeletePicture  PROTO((Nlm_SegmenT picture));
  212.  
  213. extern Nlm_SegmenT   Nlm_CreateSegment  PROTO((Nlm_SegmenT parent, Uint2 segID, Int4 maxScale));
  214. extern Nlm_SegmenT   Nlm_ResetSegment   PROTO((Nlm_SegmenT segment));
  215.  
  216. extern Nlm_SegmenT   Nlm_ParentSegment  PROTO((Nlm_SegmenT segment));
  217. extern Nlm_Int2      Nlm_SegmentID      PROTO((Nlm_SegmenT segment));
  218. extern Nlm_Boolean   Nlm_SegmentVisible PROTO((Nlm_SegmenT segment));
  219. extern Nlm_Int1      Nlm_SegmentStyle   PROTO((Nlm_SegmenT segment));
  220. extern void          Nlm_SegmentBox     PROTO((Nlm_SegmenT segment, Nlm_BoxPtr box, RectPtr mrg));
  221. extern Nlm_PrimitivE Nlm_GetPrimitive   PROTO((Nlm_SegmenT segment, Uint2 primCt));
  222.  
  223. extern void          Nlm_AddAttribute   PROTO((Nlm_SegmenT parent, Nlm_Uint1 flags, Nlm_Uint1Ptr color, Nlm_Int1 linestyle, Nlm_Int1 shading, Nlm_Int1 penwidth, Nlm_Int1 mode));
  224. extern Nlm_PrimitivE Nlm_AddRectangle   PROTO((Nlm_SegmenT parent, Nlm_Int4 left, Nlm_Int4 top, Nlm_Int4 right, Nlm_Int4 bottom, Nlm_Int2 arrow, Nlm_Boolean fill, Nlm_Uint2 primID));
  225. extern Nlm_PrimitivE Nlm_AddLine        PROTO((Nlm_SegmenT parent, Nlm_Int4 pnt1X, Nlm_Int4 pnt1Y, Nlm_Int4 pnt2X, Nlm_Int4 pnt2Y, Nlm_Boolean arrow, Nlm_Uint2 primID));
  226. extern Nlm_PrimitivE Nlm_AddSymbol      PROTO((Nlm_SegmenT parent, Nlm_Int4 pntX, Nlm_Int4 pntY, Nlm_Int2 symbol, Nlm_Boolean fill, Nlm_Int2 align, Nlm_Uint2 primID));
  227. extern Nlm_PrimitivE Nlm_AddBitmap      PROTO((Nlm_SegmenT parent, Nlm_Int4 pntX, Nlm_Int4 pntY, Nlm_Int2 width, Nlm_Int2 height, Nlm_Uint1Ptr data, Nlm_Int2 align, Nlm_Uint2 primID));
  228. extern Nlm_PrimitivE Nlm_AddCustom      PROTO((Nlm_SegmenT parent, Int4 pntX, Nlm_Int4 pntY, Nlm_Int2 width, Nlm_Int2 height, Nlm_CustomProc proc, Nlm_Int2 align, Nlm_Uint2 primID));
  229. extern Nlm_PrimitivE Nlm_AddMarker      PROTO((Nlm_SegmenT parent, Nlm_Int4 pntX, Nlm_Int4 pntY, Nlm_Int2 length, Nlm_Int2 orient, Nlm_Uint2 primID));
  230. extern Nlm_PrimitivE Nlm_AddLabel       PROTO((Nlm_SegmenT parent, Nlm_Int4 pntX, Nlm_Int4 pntY, Nlm_CharPtr string, Nlm_Int2 size, Nlm_Int2 offset, Nlm_Int2 align, Nlm_Uint2 primID));
  231.  
  232. #define SegmenT Nlm_SegmenT
  233. #define PrimitivE Nlm_PrimitivE
  234. #define CustomProc Nlm_CustomProc
  235. #define BoxInfo Nlm_BoxInfo
  236. #define BoxPtr Nlm_BoxPtr
  237. #define PntInfo Nlm_PntInfo
  238. #define PntPtr Nlm_PntPtr
  239. #define CreatePicture Nlm_CreatePicture
  240. #define DeletePicture Nlm_DeletePicture
  241. #define CreateSegment Nlm_CreateSegment
  242. #define ResetSegment Nlm_ResetSegment
  243. #define ParentSegment Nlm_ParentSegment
  244. #define SegmentID Nlm_SegmentID
  245. #define SegmentVisible Nlm_SegmentVisible
  246. #define SegmentStyle Nlm_SegmentStyle
  247. #define SegmentBox Nlm_SegmentBox
  248. #define GetPrimitive Nlm_GetPrimitive
  249. #define AddAttribute Nlm_AddAttribute
  250. #define AddRectangle Nlm_AddRectangle
  251. #define AddLine Nlm_AddLine
  252. #define AddSymbol Nlm_AddSymbol
  253. #define AddBitmap Nlm_AddBitmap
  254. #define AddCustom Nlm_AddCustom
  255. #define AddMarker Nlm_AddMarker
  256. #define AddLabel Nlm_AddLabel
  257.  
  258. #ifdef __cplusplus
  259. }
  260. #endif
  261.  
  262. #endif
  263.